﻿#ifndef _SPATIALDATABASE_DATAMETAINFO_H
#define _SPATIALDATABASE_DATAMETAINFO_H

#include "udatabase/dll_cfg.h"
#include "udatabase/interface/idatametainfo.h"
#include "math/SpatialReference.h"
#include "udatabase/interface/idataset.h"

namespace FD{
	namespace Utility{
		namespace DB{
				/// <summary>
				/// 数据集元信息类
				///记录数据集的相关信息
				/// </summary>
            class FD_DB_Export CDataMetaInfo : public FD::Utility::DB::Interface::IDataMetaInfo
			{
			private:
				FD::Utility::DB::Interface::DatasetType mType;
				String mName;
				FD::Kernel::Geometry::Interface::IEnvelope* mpEnvelop;
				mutable FD::Kernel::Math::SpatialReference* mSR;
				UINT32 mID;
				INT32 mSRID;
				INT32 mTypeID;
				UINT32 mVersion;
				FD::Kernel::Math::AltitudeMode mAltitudeMode;
				double mAltitudeValue;
				String mSR_str;
				Real mAABBRadius;
            public:	
				///<summary>
				///构造函数
				///</summary>
				///<param name=""></param>
				///<returns></returns>
				CDataMetaInfo();
				///<summary>
				///析构函数
				///</summary>
				///<param name=""></param>
				///<returns></returns>
                virtual ~CDataMetaInfo();
            public:
				///<summary>
				///获取数据集类型
				///</summary>
				///<param name=""></param>
				///<returns>数据集类型</returns>
                virtual FD::Utility::DB::Interface::DatasetType getDatasetType() const;
				///<summary>
				///设置数据集类型
				///</summary>
				///<param name="type">数据集类型</param>
				///<returns></returns>
				virtual void setDatasetType(FD::Utility::DB::Interface::DatasetType type) ;
				/// <summary>
				/// 获取数据集的名称
				/// </summary>
				/// <returns>数据集的名称</returns>
                virtual String getName() const;
				///<summary>
				///设置数据集名
				///</summary>
				///<param name="name">数据集名</param>
				///<returns></returns>
				virtual void setName(const String& name) ;
				/// <summary>
				/// 获取数据集的范围
				/// </summary>
				/// <returns>内部对象引用，无需释放</returns>
               /* virtual const FD::Kernel::Interface::Geometry::IEnvelope* getEnvelopeRef() const;*/
				 virtual const FD::Kernel::Geometry::Interface::IEnvelope* getEnvelopeRef() const;
				/// <summary>
				/// 设置数据集的范围
				/// </summary>
				/// <param name="pEnv">范围对象</param>
				/// <returns></returns>
				/*virtual void setEnvelope(FD::Kernel::Interface::Geometry::IEnvelope* pEnv) ;*/
				 virtual void setEnvelope(FD::Kernel::Geometry::Interface::IEnvelope* pEnv) ;
				/// <summary>
				/// 获取数据集的坐标系统
				/// </summary>
				/// <returns>坐标系统对象</returns>
				virtual FD::Kernel::Math::SpatialReference* getSpatialReference() const;
				
				/// <summary>
				/// 获取数据集的坐标系统
				/// </summary>
				/// <returns>坐标系统对象</returns>
				virtual void setSpatialReference(FD::Kernel::Math::SpatialReference* sr);
				
				/// <summary>
				/// 设置空间参考的id
				/// </summary>
				///<param name="srid">空间参考的id<param>
				/// <returns></returns>
				virtual void setSRID(INT32 srid);
				/// <summary>
				/// 获取空间参考的id
				/// </summary>
				/// <returns>空间参考的id</returns>
				virtual INT32 getSRID();

				/// <summary>
				/// 设置空间参考的id
				/// </summary>
				///<param name="srid">空间参考的id<param>
				/// <returns></returns>
				virtual void setSR(const String& sr);
				/// <summary>
				/// 获取空间参考的id
				/// </summary>
				/// <returns>空间参考的id</returns>
				virtual String getSR();

				/// <summary>
				/// 设置数据集类型
				/// </summary>
				/// <returns>数据集类型的id号</returns>
				virtual void setTypeID(INT32 id);
				/// <summary>
				/// 获取数据集类型
				/// </summary>
				/// <returns>数据集类型的id号</returns>
				virtual INT32 getTypeID();
				/// <summary>
				/// 设置版本号
				/// </summary>
				///<param name="version">版本号</param>
				/// <returns></returns>
				virtual void setVersion(UINT32 version);
				/// <summary>
				/// 获取版本号
				/// </summary>
				/// <returns>版本号</returns>
				virtual UINT32 getVersion();
				/// <summary>
				/// 获取数据集id
				/// </summary>
				/// <returns>数据集的id</returns>
				virtual UINT32 getID();
				/// <summary>
				/// 设置数据集的id
				/// </summary>
				/// <param name="id">id</param>
				/// <returns></returns>
				virtual void setID(UINT32 id);
				/// <summary>
				/// 获取高度模式
				/// </summary>
				/// <param name=""></param>
				/// <returns>高度模式</returns>
				virtual FD::Kernel::Math::AltitudeMode getAltitudeMode();
			   /// <summary>
			   /// 设置高度模式
			   /// </summary>
			   /// <param name="mode">高度模式</param>
			   /// <returns></returns>
				virtual void setAltitudeMode(FD::Kernel::Math::AltitudeMode mode);
				/// <summary>
				/// 获取高度值
				/// </summary>
				/// <param name=""></param>
				/// <returns>高度值</returns>
				virtual double getAltitudeValue();
				/// <summary>
				/// 设置高度值
				/// </summary>
				/// <param name="value">高度值</param>
				/// <returns></returns>
				virtual void setAltitudeValue(double value);

				
				virtual Real getAABBRadius();
				virtual void setAABBRadius(Real value);

            };			
        }
    }
}
#endif
